<style type="text/css">
.replyborder{ border:2px solid #A3A3A3;}
.rplink{display:none;}
</style>
<script language="javascript">
function quick_repty_over(k)
{
	var box = $("#Box"+k);
	box.addClass("replyborder");
	var edit = $("#Box"+k+" > .t_r");
	if($("#Box"+k+" > .t_r > .rplink").length > 0) {
		$("#Box"+k+" > .t_r > .rplink").show();
	}
}
function quick_repty_out(k)
{
	var box = $("#Box"+k);
	box.removeClass("replyborder");
	if($("#Box"+k+" > .t_r > .rplink").length > 0) {
		$("#Box"+k+" > .t_r > .rplink").hide();
	}
}
function quick_reply(k)
{
	var rpname = $(".rpname"+k).text();
	var rpid = $(".rpid"+k).text();
	$('#content').val('回应'+rpname+'：  ');
	$('#rpid').val(rpid);
}
</script>
<? if(is_array($lists) && count($lists)>0):?>
<? foreach ($lists as $k => $list):?>				
<div id="Box<?=$k;?>" class="discusBox" <?if($list["userid"] != $userid):?>onmouseover="quick_repty_over(<?=$k;?>);" onmouseout="quick_repty_out(<?=$k;?>);"<? endif;?>>
	<div class="head"><img class="blank" src="<?=gurl('images');?>/tran.gif"><a href="/home/profile/<?=$list["userinfo"]["id"];?>"><img src="<?=gurl('data');?>/upload_pic/<?=$list['userinfo']['photo'];?>" onerror="this.src='<?=gurl('images');?>/head.gif';" width="60" height="60" border="0" /></a></div>
	<div class="discusCon">
		<a href="/home/profile/<?=$list["userinfo"]["id"];?>" class="rpname<?=$k;?>"><?=$list["userinfo"]["username"];?></a>: <?=nl2br(strip_tags($list["content"]));?>
	</div>
	<div class="blank8"></div>
	<p class="t_r"><?if($list["userid"] != $userid):?><a href="#commentpost" class="rplink" onclick="quick_reply(<?=$k;?>);">回应</a><? endif;?> <? if($isowner || $list["userid"] == $userid):?><a href="#TB_inline?height=120&width=396&inlineId=hiddenModalContent_forum_comment_<?=$k;?>&modal=true" class="thickbox">删除</a><? endif;?> <em class="cCGray"><?=date("Y-m-d H:i",$list["addtime"]);?></em></p>
</div>
<div class="blank8"></div>
<div id="hiddenModalContent_forum_comment_<?=$k;?>" style=" border:1px solid; padding-top:20px; padding-left:20px; display:none;">
<div class="floatDiv">
	<div class="cc">
		<p>是否要删除？</p>	
		<div class="inputBox"><input type="button" name="" value="确定" class="airIco" onClick="golink('<?=gurl('/');?>comment/forum_delete/<?=$list['siteid'];?>/<?=$list['id'];?>');" /><input type="button" name="" value="取消" class="airIco" onClick="tb_remove();" /></div>
	</div>
</div>
</div>
<div class="rpid<?=$k;?>" style="display:none;"><?=$list["userinfo"]["id"];?></div>
<? endforeach;?>
<? endif;?>

<? if($userid):?>
<div class="return">
<a id="commentpost" name="commentpost">&nbsp;</a>
			<form action="<?=gurl('/');?>comment/forum_add" method="post" enctype="multipart/form-data" onsubmit="return Validator.Validate(this,2);">
            <textarea name="content" id="content" dataType="LimitB" min="1" max="500" msg="请检查是否输入内容或长度超过500个字" cols="" rows="" style="width:500px;height:100px;border:1px solid #CCCCCC;"></textarea>
            </div>
			<div class="blank8"></div>
			<p class="t_r" style="padding-right:75px"><input type="submit" name="dosubmit" id="dosubmit" value="回应" class="airIco" /></p>
			<input type="hidden" name="siteid" id="siteid" value="<?=$siteid;?>">
			<input type="hidden" name="dataid" id="dataid" value="<?=$id;?>">
			<input type="hidden" name="rpid" id="rpid" value="0">
			</form>
<? endif;?>		
 <? if(is_array($lists) && count($lists)>0):?>               
				<div class="allmark">
					<div class="right"><a class="goTop cCGray" href="#top">返回顶部</a></div>
				</div>
				<div class="blank8"></div>
				<div class="page">
					<?=$pagestring;?>
				</div>
			
<? endif;?>
</div>
			